package com.qst.itoffer.service;

import com.qst.itoffer.entity.JobApplyInfo;
import com.qst.itoffer.mapper.JobApplyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class JobApplyService {
    @Autowired
    private JobApplyMapper jobApplyMapper;

    public List<JobApplyInfo> getJobApplyList() {
        return jobApplyMapper.getJobApplyList();
    }

    public void deleteInvalidJobs() {

        //获取当前时间
        System.out.println("开始删除过期职位");
        Date currentDate = new Date();
        jobApplyMapper.deleteInvalidJobs(currentDate);
    }
}